package com.soulkun.smarthome.ui.main.home.dialog

import android.graphics.PorterDuff
import android.view.ViewGroup
import com.soulkun.smarthome.R
import com.soulkun.smarthome.databinding.AppDialogMainHomeSpeechRecognitionLoadingBinding
import soulkun.library.mvvm.component.BaseDataBindingDialogFragment
import soulkun.library.utils.toPx

class AppMainHomeSpeechRecognitionLoadingDialog:
    BaseDataBindingDialogFragment<AppDialogMainHomeSpeechRecognitionLoadingBinding>() {

    override fun setLayout(): Int {
        return R.layout.app_dialog_main_home_speech_recognition_loading
    }

    override fun doOnViewCreated() {
        requireDialog().window?.run {
            setLayout(requireContext().resources.getDimensionPixelSize(R.dimen.sw_200dp), requireContext().resources.getDimensionPixelSize(R.dimen.sw_200dp))
        }
        isCancelable = false
        requireDataBinding().pbMainHomeSpeechRecognitionLoadingProgress.indeterminateDrawable.setColorFilter(
            resources.getColor(
                R.color.app_orange_00
            ), PorterDuff.Mode.MULTIPLY
        )
    }

    override fun doOnResume() {
    }

    override fun doOnDismiss() {
    }

    override fun doOnDestroyView() {
    }
}